---
layout: default
---

{% if site.posts.size == 0 %}
  <h2>No post found</h2>
{% endif %}

<div class="posts">
  
  {% for post in site.posts %}
    {% if post.pinned==true %}
      <article class="post pinned">
        <h1>
            <span title="pinned"><i data-feather="anchor"></i></span><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
        </h1>

        <div clsss="meta">
          
          <span class="author">
            {{ post.author }}
          </span>

          <span class="date">
            {{ post.date | date: "%Y-%m-%d" }}
          </span>

          <ul class="tag">
            {% for tag in post.tags %}
            <li>
              <a href="{{ site.url }}{{ site.baseurl }}/tags#{{ tag }}">
                {{ tag }}
              </a>
            </li>
            {% endfor %}
          </ul>

          <script>
            feather.replace()
          </script>
        </div>

       <div class="post-excerpt">
          {%   if post.content contains site.excerpt_separator or post.content != post.excerpt %}{{ post.excerpt }}
          {%   else %}{{ post.content | lstrip | split: "
" | first }}{% endif %}
          <p>
            <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">Read More</a>
          </p>
        </div>
        
    {% endif %}
  {% endfor %}
  
  {% for post in paginator.posts %}
    {% unless post.pinned %}
    <article class="post">
      <h1>
        <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
      </h1>

      <div clsss="meta">
        
        <span class="author">
          {{ post.author }}
        </span>
            
        <span class="date">
          {{ post.date | date: "%Y-%m-%d" }}
        </span>

        <ul class="tag">
          {% for tag in post.tags %}
          <li>
            <a href="{{ site.url }}{{ site.baseurl }}/tags#{{ tag }}">
              {{ tag }}
            </a>
          </li>
          {% endfor %}
        </ul>
      </div>

      <div class="post-excerpt">
          {%   if post.content contains site.excerpt_separator or post.content != post.excerpt %}{{ post.excerpt }}
          {%   else %}{{ post.content | lstrip | split: "
" | first }}{% endif %}
          <p>
            <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">Read More</a>
          </p>
        </div>
      
    {% endunless %}
  {% endfor %}
</div>

<div class="pagination">
  {% if paginator.previous_page %}
    <span class="prev">
      <a href="{{ site.baseurl }}{{ paginator.previous_page_path }}" class="prev">
        ← 上一页
      </a>
    </span>
  {% endif %}
  {% if paginator.next_page %}
    <span class="next">
      <a href="{{ site.baseurl}}{{ paginator.next_page_path }}" class="next">
        下一页 →
      </a>
    </span>
  {% endif %}
</div>
